package gtug.duesseldorf.client.model;

import java.io.Serializable;
import java.util.ArrayList;

public class ClientWaveList implements Serializable {

	private static final long serialVersionUID = 1L;

	private ArrayList<ClientWaveId> m_waveList;

	private boolean m_isNewList;

	/**
	 * private constructor for serialization
	 */
	@SuppressWarnings("unused")
	private ClientWaveList() {
	}

	@Override
	public String toString() {
		StringBuffer buf = new StringBuffer();
		buf.append("WaveList: {");
		if (m_waveList != null || m_waveList.size() != 0) {
			for (ClientWaveId w : m_waveList) {
				buf.append(w).append(", ");
			}
		}
		buf.append("}");

		return buf.toString();
	}

	public ClientWaveList(ArrayList<ClientWaveId> waveList, boolean isNewList) {
		m_waveList = waveList;
		m_isNewList = isNewList;
	}

	public ClientWaveList(ClientWaveId wave, boolean isNewList) {
		ArrayList<ClientWaveId> al = new ArrayList<ClientWaveId>();
		al.add(wave);

		m_waveList = al;
		m_isNewList = isNewList;
	}

	public ArrayList<ClientWaveId> getWaveList() {
		return m_waveList;
	}

	public boolean isNewList() {
		return m_isNewList;
	}

}
